package com.xin.bi.mq;

import com.xin.bi.constant.MqConstant;
import com.xin.bi.service.ChartService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class BiMessageProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;



    public void sendMessage(String message){
        rabbitTemplate.convertAndSend(MqConstant.BI_EXCHANGE_NAME,MqConstant.BI_ROUTING_KEY,message);
    }
}
